package com.bestcem.xm.user.grpc.client.convert.strategy;

import com.bestcem.bp.pay.grpc.v1.enums.OrderStatusEnum;
import com.bestcem.bp.pay.grpc.v1.enums.OrderTypeEnum;
import com.bestcem.bp.pay.grpc.v1.enums.PayMethodEnum;

/**
 * 订单相关转换类策略
 *
 * @author wangyunyun <yunyun.wang@idiaoyan.com>
 * @version v1.0
 * @date 2022/6/20 11:37
 */
public interface OrderGrpcConvertStrategy {

    default PayMethodEnum.PayMethod payMethodConveter(Integer value) {
        return PayMethodEnum.PayMethod.forNumber(value);
    }

    default OrderTypeEnum.OrderType orderTypeConveter(Integer value) {
        return OrderTypeEnum.OrderType.forNumber(value);
    }

    default OrderStatusEnum.OrderStatus orderStatusConveter(Integer value) {
        return OrderStatusEnum.OrderStatus.forNumber(value);
    }
}
